{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/hyb_o2o/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}
    .fxfont3{text-align: left;}
    .store_list_img{width: 80px;height:80px;}
    .yg5_tabel{border: none;outline: none;text-align: center;}
    .yg5_tr2>td{padding: 10px 5px;border: 1px solid #e5e5e5;}
    .yg5_tr1>td{
        padding: 10px 5px;
        /*border-bottom: 1px solid #e5e5e5;*/
        border: 1px solid #e5e5e5;
        background-color: #FAFAFA;
        font-weight: bold;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .check_img{width: 45px;height: 45px;}
    .fxmain{background-color: white;}
    .panel{box-shadow: 0 0px 0px;}
    .fxrow{border-bottom: 1px solid #e5e5e5;padding-bottom: 10px;}
    .fxuserimg{width: 30px;height: 30px;border-radius: 50%;border:1px solid #ccc;}
    .fxuserimg2{width: 30px;height: 30px;border-radius: 50%;border:1px solid #ccc;margin-right: 10px;}
    .fxfont1{color: #eb6060;}
    .fxfont2{color: #ffc000;}
    .recharge_info{display: -webkit-flex;display: -webkit-box;display: -ms-flexbox;display: flex;justify-content: space-around;margin-bottom: 10px;}
    .recharge_info>div{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;border:1px solid #efefef;margin:0 10px;padding: 10px 22px;line-height: 25px;color: #333;width: 310px;height: 97px;}
    .tabs-container{border-bottom: 1px solid #e5e5e5;padding: 10px;}
    .fxnum{line-height: 30px;font-size: 14px;}
</style>
<ul class="nav nav-tabs">
  <span class="ygxian"></span>
  <div class="ygdangq">当前位置:</div>
  <li class="active"><a href="javascript:void(0);">分销商管理</a></li>
  </ul>
  <div class="main fxmain" style="padding: 1px 30px;">
<div class="row fxrow">
    <div class="col-lg-12">
        <form action="" method="get" class="col-md-6">
            <input type="hidden" name="c" value="site" />
                   <input type="hidden" name="a" value="entry" />
                   <input type="hidden" name="m" value="hyb_o2o" />
                   <input type="hidden" name="do" value="fxlist" />
            <div class="input-group" style="width: 300px;margin-top: 20px;">
                <input type="text" name="keywords" class="form-control" placeholder="请输入分销商名称">
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit" value="查找"/>
                </span>
            </div>
            <input type="hidden" name="token" value="{$_W['token']}"/>
        </form>
    </div>
</div>  
<div class="main" style="margin: 5px 0px;">
    <div class="panel">
        <div class="panel-body" style="padding: 0px 30px;">
            <div class="row">
                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1">
                        <td class="fxfont3">分销商名称</td>
                        <td>手机号码</td>
                        <td>累计佣金</td>
                        <td>下级分销商</td>
                        <td>申请时间</td>
                        <td>审核状态</td>
                        <td>操作</td>
                    </tr>
                    {loop $list $item}
                    <tr class="yg5_tr2">
                      <td class="fxfont3">
                      <img class="fxuserimg" src="{$item['thumb']}">
                      {$item['f_name']}</td>
                     <td class="store_td1">{$item['f_tel']}</td>
                     <td>
                        <span class="fxfont1">{if $item['f_money']}{$item['f_money']}{else}0.00{/if}</span>
                     </td>
                     <td>{$item['fenxiaoxiaji']}</td>
                     <td>{$item['f_time']}</td>


                     {if $item['f_style']=='待审核'}
                     <td>
                        <span class="label storered">待审核</span>
                    </td >
                    {else}
                    <td >
                        <span class="label storeblue">已通过</span>
                    </td>
                   {/if}  
                   <td>
                      {if $item['f_style']=='待审核'}
                      <a class="btn ygyouhui2 btn-xs" href="{php echo $this->createWebUrl('fxlist',array('f_id'=>$item['f_id'],'op'=>'adopt'))}" title="通过">通过</a>
                      {elseif $item['f_style']=='审核通过'}
                      <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModalb{$item['f_id']}">
                          <span class="fa fa-money" style="margin:0px;"></span>
                          <span class="bianji" style="left:-70%;">充值佣金
                              <span class="arrowdown"></span>
                          </span>
                      </a>
                      {/if}
                        <a href="{php echo $this->createWebUrl('fxlist', array('f_id' => $item['f_id'],'op'=>'delete'))}" class="storespan btn btn-xs" onclick="return confirm('确认删除吗？');return false;" title="删除">
                            <span class="fa fa-trash-o"></span>
                            <span class="bianji">删除
                                <span class="arrowdown"></span>
                            </span>
                        </a>
                  </td>

              </td>

          </tr>
          		<div class="modal fade" id="myModalb{$item['f_id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                          <form action="" method="post" enctype="multipart/form-data" class="">
                              <div class="modal-content">
                                  <div class="modal-header">
                                      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                      <h4 class="modal-title" id="myModalLabel">佣金充值</h4>
                                  </div>
                                  <div class="modal-body form-horizontal form-validate">
                                      <div class="recharge_info">
                                        <div>
                                          <label class="pull-left" style="margin-right: 25px">分销商名称</label>
                                          <div class="pull-left">
                                            <img class="fxuserimg2" src="{$item['thumb']}">{$item['f_name']}
                                          </div>
                                        </div>
                                        <!-- <div>
                                          <label class="pull-left" style="margin-right: 25px">会员信息</label>
                                          <div class="pull-left">
                                            ID:{$item['u_id']}<br/>姓名：{$item['ur_name']}<br/>手机号：{$item['f_tel']}
                                          </div>
                                        </div>   -->                                      
                                      <!-- <input type="number" name="reply" class="accout_inp col-md-9" placeholder="请输入金额"> -->
                                      </div>
                                      <div class="tabs-container">
                                        充值余额
                                      </div>
                                      <div class="form-group"></div>
                                      	<div class="form-group">
						                    <label class="col-sm-2 control-label">当前余额</label>
						                    <div class="col-sm-10">
						                        <span class="fxnum">{$item['f_money']}</span>
						                    </div>
						                </div>
						                <div class="form-group">
						                    <label class="col-md-2 control-label">充值金额</label>
						                    <div class="col-md-5">
						                    	<input type="number" name="reply" class="form-control accout_inp" placeholder="请输入金额">
						                    </div>
						                </div>
                                  </div>
                                  <div class="modal-footer">
                                      <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                      <input type="submit" name="submit2" class="btn btn-info" value="确定">
                                      <input type="hidden" name="token" value="{$_W['token']}"/>
                                      <input type="hidden" name="f_id" value="{$item['f_id']}"/>
                                  </div>
                              </div>
                          </form>
                      </div>
                  </div>
          {/loop}
          {if empty($list)}
          <tr class="yg5_tr2">
            <td colspan="9">
              暂无分销商
          </td>
      </tr> 
      {/if}        



  </table>

</div>

</div>

</div>
</div>
</div>
<div class="text-right we7-margin-top">

   {$pager}

</div>
<script type="text/javascript">
    $(function(){
        // $("#frame-9").addClass("in");
        $("#frame-9").show();
        $("#yframe-9").addClass("wyactive");
    })
</script>
{template "common/footer"}